using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using EntLibEC.Biz;
using EntLibEC.Cmn;

namespace EntLibEC.View.Cmn
{
    public partial class CustomerVIPRank : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        public void BindStatus(bool isAll)
        {
            ddlStatus.Items.Clear();
            ddlStatus.DataSource = AppEnum.GetCustomerVIPRank();
            ddlStatus.DataValueField = "key";
            ddlStatus.DataTextField = "value";
            ddlStatus.DataBind();
            if (isAll)
                ddlStatus.Items.Insert(0, new ListItem(AppConst.AllSelectString, AppConst.IntNull.ToString()));
        }

        public int StatusSysNo
        {
            get
            {
                return Convert.ToInt32(ddlStatus.SelectedItem.Value);
            }
            set
            {
                ddlStatus.SelectedIndex = ddlStatus.Items.IndexOf(ddlStatus.Items.FindByValue(value.ToString()));
            }
        }
    }
}